﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Main.master" CodeBehind="Default.aspx.cs" Inherits="StockCrawler._Default" %>

<%@ Register assembly="DevExpress.Web.v14.2, Version=14.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Data.Linq" tagprefix="dx" %>
<%@ Register Src="~/UserControl/ucStockFilter.ascx" TagPrefix="uc1" TagName="ucStockFilter" %>
<%@ Register Src="~/UserControl/ucHistoryInfo.ascx" TagPrefix="uc1" TagName="ucHistoryInfo" %>

<asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="server">
    <link rel="stylesheet" type="text/css" href="../Content/StockFilter.css" />
    <script src="../Scripts/HistoryCallback.js"  type="text/javascript"></script>
    <div id="filter_stock" style="margin: 10px 0px 10px 20px;">
        <uc1:ucStockFilter runat="server" id="objUcStockFilter"/>
    </div>
    <div id="stock" style="height: 90%;">
        <dx:ASPxSplitter ID="ASPxSplitter2" runat="server" Height="100%">
            <Styles>
                
                <Pane>
                    <Paddings Padding="0px" />
                </Pane>
            </Styles>
            <Panes>
                <dx:SplitterPane MinSize="400px" Size="430" Name="stockContainer" ShowCollapseBackwardButton="True">
                    <ContentCollection>
                        <dx:SplitterContentControl runat="server">
                            <dx:ASPxCallbackPanel ID="ASPxCallbackPanelStock" runat="server" ClientInstanceName="ASPxCallbackPanelStockClient">
                                <SettingsLoadingPanel Enabled="false" />
                                <PanelCollection>
                                    <dx:PanelContent>
                                        <dx:ASPxGridView ID="gridViewStock" Width="100%" KeyFieldName="id_stock" runat="server" AutoGenerateColumns="False">
                                            <ClientSideEvents SelectionChanged="GridViewStock_SelectionChanged" />
                                            <Columns>
                                                <dx:GridViewDataTextColumn Caption="ID" FieldName="id_stock" ShowInCustomizationForm="True" Visible="False" VisibleIndex="0">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataCheckColumn VisibleIndex="1" FieldName="isRemark" Caption="#" Width="40">
                                                    <DataItemTemplate>
                                                        <dx:ASPxCheckBox ID="chkIsRemark" ClientInstanceName="chkIsRemarkClient" runat="server"  Checked='<%# Eval("isRemark") %>' OnCheckedChanged="chkIsRemark_CheckedChanged">
                                                            <ClientSideEvents CheckedChanged="ASPxCheckBox_CheckedChanged" />
                                                        </dx:ASPxCheckBox>
                                                    </DataItemTemplate>
                                                </dx:GridViewDataCheckColumn>
                                                <dx:GridViewDataTextColumn Caption="Mã" FieldName="code" ShowInCustomizationForm="True" VisibleIndex="1" Width="40">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="Sàn" FieldName="stockexchange_name" ReadOnly="True" VisibleIndex="2" Width="50">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn FieldName="eps" ReadOnly="True" VisibleIndex="4" Width="50">
                                                    <PropertiesTextEdit DisplayFormatString="#,###" />
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn FieldName="pe" ReadOnly="True" VisibleIndex="5" Width="40">
                                                    <PropertiesTextEdit DisplayFormatString="##.##" />
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="KLNY" FieldName="klcp_niemyet" ReadOnly="True" VisibleIndex="6" Width="80">
                                                    <PropertiesTextEdit DisplayFormatString="#,###" />
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="KLĐLH" FieldName="klcp_luuhanh" ReadOnly="True" VisibleIndex="7" Width="80">
                                                    <PropertiesTextEdit DisplayFormatString="#,###" />
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn FieldName="vcsh" ReadOnly="True" VisibleIndex="8" Width="90">
                                                    <PropertiesTextEdit DisplayFormatString="#,###" />
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn FieldName="bv" ReadOnly="True" VisibleIndex="9" Width="40">
                                                    <PropertiesTextEdit DisplayFormatString="#,###" />
                                                </dx:GridViewDataTextColumn>
                                            </Columns>
                                            <SettingsBehavior AllowFocusedRow="true" ProcessFocusedRowChangedOnServer="True" AllowSelectByRowClick="True" AllowSelectSingleRowOnly="True" />
                                            <SettingsPager Mode="ShowAllRecords" />
                                            <Settings VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" VerticalScrollableHeight="485" />
                                            <Border BorderWidth="0px"></Border>
                                        </dx:ASPxGridView>
                                    </dx:PanelContent>
                                </PanelCollection>
                            </dx:ASPxCallbackPanel>
                        </dx:SplitterContentControl>
                    </ContentCollection>
                </dx:SplitterPane>
                <dx:SplitterPane MinSize="350px">
                    <ContentCollection>
                        <dx:SplitterContentControl runat="server">
                            
                            <dx:ASPxPageControl ID="StockTabPage" runat="server" ActiveTabIndex="0" EnableHierarchyRecreation="True" Width="100%">
                                <TabPages>
                                    <dx:TabPage Text="Lịch sử giao dịch">
                                        <ContentCollection>
                                            <dx:ContentControl ID="ContentControlHistory" runat="server">
                                                <%-- ASPxCallbackPanelHistory --%>
                                                <dx:ASPxCallbackPanel ID="ASPxCallbackPanelHistory" runat="server" ClientInstanceName="ASPxCallbackPanelHistoryClient" OnCallback="ASPxCallbackPanelHistory_Callback"> 
                                                    <SettingsLoadingPanel Enabled="false" />
                                                    <PanelCollection>
                                                        <dx:PanelContent>
                                                            <dx:ASPxPanel ID="pricebox" runat="server" BackColor="#1D1D1D" Height="30px" ForeColor="White"/>
                                                            <uc1:ucHistoryInfo runat="server" id="objUcHistoryInfo" />
                                                        </dx:PanelContent>
                                                    </PanelCollection>
                                                </dx:ASPxCallbackPanel>
                                                
                                            </dx:ContentControl>
                                        </ContentCollection>
                                    </dx:TabPage>
                                    <dx:TabPage Text="Tin tức">
                                        <ContentCollection>
                                            <dx:ContentControl ID="ContentControl2" runat="server">
                                                <div id="Div1" runat="server" style="height: 30px; background-color: #1D1D1D; color: white">
                                                    <dx:ASPxLabel ID="lblNews" runat="server" ClientInstanceName="lblNewsClient">
                                                    </dx:ASPxLabel>
                                                </div>
                                            </dx:ContentControl>
                                        </ContentCollection>
                                    </dx:TabPage>
                                </TabPages>
                            </dx:ASPxPageControl>
                        </dx:SplitterContentControl>
                    </ContentCollection>
                </dx:SplitterPane>
            </Panes>
        </dx:ASPxSplitter>
    </div>
</asp:Content>

